SET(LIBRARY_OUTPUT_PATH ${CPP_LIBRARY_OUTPUT_PATH})

QT4_WRAP_CPP( DefaultPluginsMenu_MOC 
  DefaultPluginsMenu.h 
  ../Core/MainWindow.h )

QT4_ADD_RESOURCES( TINKERCELL_QRC Tinkercell.qrc )

IF( UNIX )
    ADD_EXECUTABLE( Tinkercell 
      Main.cpp
      ${DefaultPluginsMenu_MOC}
      DefaultPluginsMenu.cpp
      ${TINKERCELL_QRC}
    )

    TARGET_LINK_LIBRARIES( Tinkercell
      TinkerCellCore
    )
ENDIF( UNIX )

#---------------------------------------------------------------------
#  INSTALL Tinkercell executable and required files and folders
#---------------------------------------------------------------------

INSTALL(TARGETS Tinkercell 
   BUNDLE DESTINATION bin/../
   RUNTIME DESTINATION bin/../
   COMPONENT "TinkerCell")
   
FILE(GLOB TINKERCELL_EXAMPLES examples/*.xml)
INSTALL(FILES ${TINKERCELL_EXAMPLES} DESTINATION examples COMPONENT "examples")
INSTALL(FILES tinkercell.qss DESTINATION bin/../ COMPONENT "stylesheet")
